<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmToolBox.cpp -->
  <meta name="description" content="类似QToolBox的容器窗口，可分割多个页面区域.">
  <title>QCtmToolBox Class | QCustomUi 1.16.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html" translate="no">QCustomUi 1.16.0</a></li>
<li><a href="qcustomui-module.html" translate="no">QCustomUi</a></li>
<li>QCtmToolBox</li>
<li id="buildversion">QCustomUi 1.16.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">QCtmToolBox Class</h1>
<!-- $$$QCtmToolBox-brief -->
<p>类似<a href="https://doc.qt.io/qt/qtoolbox.html" translate="no">QToolBox</a>的容器窗口，可分割多个页面区域. <a href="#details">More...</a></p>
<!-- @@@QCtmToolBox -->
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmToolBox.h&gt;</span></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> QWidget</td></tr>
</table></div>
<ul>
<li><a href="qctmtoolbox-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#QCtmToolBox" translate="no">QCtmToolBox</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#dtor.QCtmToolBox" translate="no">~QCtmToolBox</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#addWidget" translate="no">addWidget</a></b>(const QString &amp;<i>title</i>, QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QSize &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#iconSize" translate="no">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#indexOf" translate="no">indexOf</a></b>(QWidget *<i>widget</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#insertWidget" translate="no">insertWidget</a></b>(int <i>index</i>, const QString &amp;<i>title</i>, QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#removeWidget" translate="no">removeWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#setDefaultStretch" translate="no">setDefaultStretch</a></b>(int <i>index</i>, int <i>stretch</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#setIconSize" translate="no">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#setSizes" translate="no">setSizes</a></b>(const QList&lt;int&gt; &amp;<i>sizes</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#setStretchFactor" translate="no">setStretchFactor</a></b>(int <i>index</i>, int <i>stretch</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;int&gt; </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#sizes" translate="no">sizes</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#widget" translate="no">widget</a></b>(int <i>index</i>) const</td></tr>
</table></div>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#iconSizeChanged" translate="no">iconSizeChanged</a></b>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmtoolbox.html#showEvent" translate="no">showEvent</a></b>(QShowEvent *<i>event</i>) override</td></tr>
</table></div>
<!-- $$$QCtmToolBox-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmToolBox -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmToolBox[overload1]$$$QCtmToolBoxQWidget* -->
<h3 class="fn" translate="no" id="QCtmToolBox"><code class="details extra" translate="no">[explicit]</code> QCtmToolBox::<span class="name">QCtmToolBox</span>(<span class="type">QWidget</span> *<i>parent</i> = nullptr)</h3>
<p>构造一个父窗口为 <i translate="no">parent</i> 的toolbox.</p>
<!-- @@@QCtmToolBox -->
<!-- $$$~QCtmToolBox[overload1]$$$~QCtmToolBox -->
<h3 class="fn" translate="no" id="dtor.QCtmToolBox"><code class="details extra" translate="no">[virtual noexcept]</code> QCtmToolBox::<span class="name">~QCtmToolBox</span>()</h3>
<p>析构当前toolbox对象.</p>
<!-- @@@~QCtmToolBox -->
<!-- $$$addWidget[overload1]$$$addWidgetconstQString&QWidget* -->
<h3 class="fn" translate="no" id="addWidget"><span class="type">void</span> QCtmToolBox::<span class="name">addWidget</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, <span class="type">QWidget</span> *<i>widget</i>)</h3>
<p>添加一个标题为 <i translate="no">title</i> 显示内容为 <i translate="no">widget</i> 的子窗口.</p>
<p><b>See also </b><a href="qctmtoolbox.html#insertWidget" translate="no">insertWidget</a> and <a href="qctmtoolbox.html#removeWidget" translate="no">removeWidget</a>.</p>
<!-- @@@addWidget -->
<!-- $$$iconSize -->
<h3 class="fn" translate="no" id="iconSize">const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;QCtmToolBox::<span class="name">iconSize</span>() const</h3>
<p>返回Action的图标大小.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property iconSize. </p>
</div><p><b>See also </b><a href="qctmtoolbox.html#setIconSize" translate="no">setIconSize</a>.</p>
<!-- @@@iconSize -->
<!-- $$$iconSizeChanged -->
<h3 class="fn" translate="no" id="iconSizeChanged"><code class="details extra" translate="no">[signal]</code> <span class="type">void</span> QCtmToolBox::<span class="name">iconSizeChanged</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;<i>size</i>)</h3>
<p>当Action的图标大小发生改变时发送该信号 <i translate="no">size</i>.</p>
<div class="admonition note"><p><b>Note: </b>Notifier signal for property <a href="qctmtoolbox.html#iconSize" translate="no">iconSize</a>. </p>
</div><p><b>See also </b><a href="qctmtoolbox.html#setIconSize" translate="no">setIconSize</a>.</p>
<!-- @@@iconSizeChanged -->
<!-- $$$indexOf[overload1]$$$indexOfQWidget* -->
<h3 class="fn" translate="no" id="indexOf"><span class="type">int</span> QCtmToolBox::<span class="name">indexOf</span>(<span class="type">QWidget</span> *<i>widget</i>) const</h3>
<p>返回 <i translate="no">widget</i> 的序号.</p>
<p><b>See also </b><a href="qctmtoolbox.html#widget" translate="no">widget</a>.</p>
<!-- @@@indexOf -->
<!-- $$$insertWidget[overload1]$$$insertWidgetintconstQString&QWidget* -->
<h3 class="fn" translate="no" id="insertWidget"><span class="type">void</span> QCtmToolBox::<span class="name">insertWidget</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, <span class="type">QWidget</span> *<i>widget</i>)</h3>
<p>在 <i translate="no">index</i> 的位置插入一个标题为 <i translate="no">title</i> 显示内容为 <i translate="no">widget</i> 的子窗口.</p>
<p><b>See also </b><a href="qctmtoolbox.html#addWidget" translate="no">addWidget</a> and <a href="qctmtoolbox.html#removeWidget" translate="no">removeWidget</a>.</p>
<!-- @@@insertWidget -->
<!-- $$$removeWidget[overload1]$$$removeWidgetQWidget* -->
<h3 class="fn" translate="no" id="removeWidget"><span class="type">void</span> QCtmToolBox::<span class="name">removeWidget</span>(<span class="type">QWidget</span> *<i>widget</i>)</h3>
<p>移除子窗口 <i translate="no">widget</i>.</p>
<p><b>See also </b><a href="qctmtoolbox.html#addWidget" translate="no">addWidget</a> and <a href="qctmtoolbox.html#insertWidget" translate="no">insertWidget</a>.</p>
<!-- @@@removeWidget -->
<!-- $$$setDefaultStretch[overload1]$$$setDefaultStretchintint -->
<h3 class="fn" translate="no" id="setDefaultStretch"><span class="type">void</span> QCtmToolBox::<span class="name">setDefaultStretch</span>(<span class="type">int</span> <i>index</i>, <span class="type">int</span> <i>stretch</i>)</h3>
<p>设置 <i translate="no">index</i> 子窗口的默认缩放因子 <i translate="no">stretch</i>.</p>
<!-- @@@setDefaultStretch -->
<!-- $$$setIconSize -->
<h3 class="fn" translate="no" id="setIconSize"><span class="type">void</span> QCtmToolBox::<span class="name">setIconSize</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;<i>size</i>)</h3>
<p>设置Action的图标大小 <i translate="no">size</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmtoolbox.html#iconSize" translate="no">iconSize</a>. </p>
</div><p><b>See also </b><a href="qctmtoolbox.html#iconSize" translate="no">iconSize</a>.</p>
<!-- @@@setIconSize -->
<!-- $$$setSizes[overload1]$$$setSizesconstQList<int>& -->
<h3 class="fn" translate="no" id="setSizes"><span class="type">void</span> QCtmToolBox::<span class="name">setSizes</span>(const <span class="type"><a href="https://doc.qt.io/qt/qlist.html" translate="no">QList</a></span>&lt;<span class="type">int</span>&gt; &amp;<i>sizes</i>)</h3>
<p>设置子窗口们的大小 <i translate="no">sizes</i>.</p>
<p><b>See also </b><a href="qctmtoolbox.html#sizes" translate="no">sizes</a>.</p>
<!-- @@@setSizes -->
<!-- $$$setStretchFactor[overload1]$$$setStretchFactorintint -->
<h3 class="fn" translate="no" id="setStretchFactor"><span class="type">void</span> QCtmToolBox::<span class="name">setStretchFactor</span>(<span class="type">int</span> <i>index</i>, <span class="type">int</span> <i>stretch</i>)</h3>
<p>设置第 <i translate="no">index</i> 子窗口的缩放因子 <i translate="no">stretch</i>.</p>
<!-- @@@setStretchFactor -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" translate="no" id="showEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmToolBox::<span class="name">showEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qshowevent.html" translate="no">QShowEvent</a></span> *<i>event</i>)</h3>
<!-- @@@showEvent -->
<!-- $$$sizes[overload1]$$$sizes -->
<h3 class="fn" translate="no" id="sizes"><span class="type"><a href="https://doc.qt.io/qt/qlist.html" translate="no">QList</a></span>&lt;<span class="type">int</span>&gt; QCtmToolBox::<span class="name">sizes</span>() const</h3>
<p>返回子窗口们的大小.</p>
<p><b>See also </b><a href="qctmtoolbox.html#setSizes" translate="no">setSizes</a>.</p>
<!-- @@@sizes -->
<!-- $$$widget[overload1]$$$widgetint -->
<h3 class="fn" translate="no" id="widget"><span class="type">QWidget</span> *QCtmToolBox::<span class="name">widget</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>返回第 <i translate="no">index</i> 位置的子窗口.</p>
<p><b>See also </b><a href="qctmtoolbox.html#indexOf" translate="no">indexOf</a>.</p>
<!-- @@@widget -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
